function countDown(time) {
    let t = time;
    const interval = setInterval(() => {
      if (t < 0) {
        clearInterval(interval);
        console.log("success");
      } else {
        console.log("time", t);
        t--;
      }
    }, 1000);
  }

  countDown(60)